<!DOCTYPE html>
<title>Test that the :-webkit-full-screen-ancestor selector matches outside of shadow DOM boundary.</title>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<script src="trusted-click.js"></script>
<div id="log"></div>
<div id="host"></div>
<script>
async_test(function()
{
    var host = document.getElementById("host");
    var root = host.attachShadow({ mode: "open" });
    var target = document.createElement("div");
    host.appendChild(target);

    trusted_request(this, target, document.body);
    document.onfullscreenchange = this.step_func_done(function()
    {
      assert_true(host.matches(":-webkit-full-screen-ancestor"));
    });
});
</script>
